package com.vcc.core.constant;


public enum CardTypeEnum {
    NORMAL("normal", "常规卡"),
    SHARE("share", "共享卡"),
    ;

    private String code;
    private String desc;

    CardTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static CardTypeEnum fromCode(String code) {
        for (CardTypeEnum status : CardTypeEnum.values()) {
            if (status.getCode().equals(code)) {
                return status;
            }
        }
        return null; // 或者抛出异常
    }

}
